const router = require('koa-router')()

router.get('/', async ctx => { 
    // 获取session
    console.log(ctx.session.username)
    ctx.body = 'Welcome'
})

router.get('/login', async ctx => { 
    // 设置session
    ctx.session.username = 'jimmy'
    ctx.body = '登录成功'
})

module.exports = router